package com.jxgk.application.service;

import com.jxgk.application.mapper.UserMapper;
import com.jxgk.application.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public void addUser(User user){
        userMapper.insert(user);
    }


    public List<User> listUser() {
        return userMapper.selectAll();
    }

    public User login(User user) {
        return userMapper.login(user);
    }
}
